# -*- coding: utf-8 -*-
# @Time    : 2022/7/16 19:22
# @Author  : catherine
# @Email   : catherine_csq@163.com
# @File    : customer_care_home_page.py
# @Software: PyCharm

from selenium.webdriver.common.by import By

from pages.base_page import BasePage


class CustomerCareHomePage(BasePage):
    '''客户关怀主页类'''
    url="http://192.168.189.1:8081/crm/index.php?m=customer&a=cares"
    #定位器
    add_customer_care_locator = (By.XPATH, '/html/body/div[5]/div[2]/div[1]/div/a/i')
    check_customer_care_locator=(By.XPATH,'//*[@id="form1"]/table/tbody/tr[1]/td[7]/a[1]')

    def click_add_customer_care(self):
        '''点击新建客户关怀按钮，将进入新建客户关怀界面'''
        self.find_element(self.add_customer_care_locator).click()

    def click_check_customer_care(self):
        '''点击第一个客户关怀的查看按钮，将进入客户关怀详情页面'''
        self.find_element(self.add_customer_care_locator).click()